import React from "react";
import {Button,Input,Icon} from 'antd';

const Search = Input.Search;


function HeaderLeft (props){
    const {className,btn1,btn2,active} = props;
    return(<div className={className}>
            <Button
                key="btn_1"
                onClick={btn1.onClick}
                style={btn1.style}
                type={active == "2" ? "primary" : ""}
            >
                {btn1.name}
            </Button>
            <Button
                key="btn_2"
                onClick={btn2.onClick}
                style={btn2.style}
                type={active == "1" ? "primary" : ""}
            >
                {btn2.name}
            </Button>
        </div>
    )
}


function HeaderRight (props){

    const {searchConf,className,value,onChange} = props;

    return(
        <div className={className}>
            <Search
                onSearch={props.onSearch}
                {...searchConf}
                value={value}
                onChange={onChange}
            />
        </div>
    )
}
export {HeaderLeft,HeaderRight}